package task;

import java.util.Scanner;

public class Task3_10 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int a = input.nextInt();
        int b = input.nextInt();
        for (int i = a / 2; i > 0 ; i--) {
            if(a % i == 0 && b % i == 0){
                System.out.println("最大公约数为：" + i);
                break;
            }

        }
    }
}
